import { Avatar } from 'antd-mobile'
import styles from '../css/chat.module.css'

function MsgLeft({ msg }) {
  return (
    <div className={styles.MsgLeft}>
      {/* 左侧头像 */}
      <div className={styles.avatar}>
        <Avatar src="https://images.unsplash.com/photo-1493666438817-866a91353ca9?ixlib=rb-0.3.5&q=80&fm=jpg&crop=faces&fit=crop&h=200&w=200&s=b616b2c5b373a80ffc9636ba24f7a4a9" />
      </div>
      {/* 右侧聊天消息 */}
      <div
        className={styles.msg}
        dangerouslySetInnerHTML={{ __html: msg }}
      ></div>
    </div>
  )
}

export default MsgLeft
